package azalea.mqtt.parse;

import azalea.mqtt.message.utils.ByteUtils;
import azalea.mqtt.message.utils.LengthUtil;
import azalea.mqtt.parse.data.CmdType;
import azalea.mqtt.parse.data.ConnectMqttData;
import azalea.mqtt.parse.data.PubRecMqttData;
import azalea.mqtt.parse.data.PubRelMqttData;
import azalea.mqtt.parse.data.PublishMqttData;

public class MqttParser {
	public static MqttData parse(byte[] payloads,int validLength) {
		if (payloads == null || payloads.length <= 0) {
			return null;
		}
		MqttData mqttData = null;// = new MqttData();
		int cmd = payloads[0] & 0xFF;
		cmd = cmd >> 4;
		CmdType cmdType = null;
		for (CmdType cType : CmdType.values()) {
			if (cType.getValue() == cmd) {
				cmdType = cType;
				break;
			}
		}
		if (cmdType == null) {
			return null;
		}
		switch (cmdType) {
		case CONNECT:
			mqttData = handleCONNECT(payloads);
			break;
		case CONNACK:
			mqttData = handleCONNACK(payloads);
			break;
		case PUBLISH:
			mqttData = handlePUBLISH(payloads,validLength);
			break;
		case PUBACK:
			mqttData = handlePUBACK(payloads);
			break;
		case PUBREC:
			mqttData = handlePUBREC(payloads);
			break;
		case PUBREL:
			mqttData = handlePUBREL(payloads);
			break;
		case PUBCOMP:
			mqttData = handlePUBCOMP(payloads);
			break;
		case SUBSCRIBE:
			mqttData = handleSUBSCRIBE(payloads);
			break;
		case SUBACK:
			mqttData = handleSUBACK(payloads);
			break;
		case UNSUBSCRIBE:
			mqttData = handleUNSUBSCRIBE(payloads);
			break;
		case UNSUBACK:
			mqttData = handleUNSUBACK(payloads);
			break;
		case PINGREQ:
			mqttData = handlePINGREQ(payloads);
			break;
		case PINGRESP:
			mqttData = handlePINGRESP(payloads);
			break;
		case DISCONNECT:
			mqttData = handleDISCONNECT(payloads);
			break;
		}
		return mqttData;
	}

	public static MqttData parsePublish(byte[] payloads,int validLength) {
		MqttData m = handlePUBLISH(payloads,validLength);
		return m;
	}

	private static MqttData handleDISCONNECT(byte[] payloads) {
		// TODO Auto-generated method stub
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.DISCONNECT);
		return mqttData;
	}

	private static MqttData handlePINGRESP(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.PINGRESP);
		return mqttData;
	}

	private static MqttData handlePINGREQ(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.PINGREQ);
		return mqttData;
	}

	private static MqttData handleUNSUBACK(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.UNSUBACK);
		return mqttData;
	}

	private static MqttData handleUNSUBSCRIBE(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.UNSUBSCRIBE);
		return mqttData;
	}

	private static MqttData handleSUBACK(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.SUBACK);
		return mqttData;
	}

	private static MqttData handleSUBSCRIBE(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.SUBSCRIBE);
		return mqttData;
	}

	private static MqttData handlePUBCOMP(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.PUBCOMP);
		return mqttData;
	}

	private static MqttData handlePUBREL(byte[] payloads) {
		PubRelMqttData mqttData = new PubRelMqttData();
		mqttData.setCmdType(CmdType.PUBREL);
		int id=payloads[2];
		id=id<<8;
		id+=payloads[3];
		mqttData.setPackageId(id);
		return mqttData;
	}

	private static MqttData handlePUBREC(byte[] payloads) {
		PubRecMqttData mqttData = new PubRecMqttData();
		mqttData.setCmdType(CmdType.PUBREC);
		int id=payloads[2];
		id=id<<8;
		id+=payloads[3];
		mqttData.setPackageId(id);
		return mqttData;
	}

	private static MqttData handlePUBACK(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.PUBACK);
		return mqttData;
	}

	private static MqttData handlePUBLISH(byte[] payloads,int validLength) {
		// TODO Auto-generated method stub
		PublishMqttData publishMqttData = new PublishMqttData();
		// 30 17 00 03 61 2F 61 7B 22 69 64 22 3A 31 2C 22 76 61 6C 75 65 22 3A 32 7D
		int qos=getQos(payloads[0]);
		publishMqttData.setQos(qos);
		int[] pair = LengthUtil.parseLength(payloads, 1);
		int len = pair[0];
		int offset = pair[1];
		int topicLen = payloads[1 + offset] * 256 + payloads[1 + offset + 1];
		
		//position >= pair[0] + pair[1] + 1
		if(len+1+offset>validLength) {
			MqttData mqttData = new MqttData();
			mqttData.setCmdType(CmdType.NIL);
			return mqttData;
		}
		
		//System.out.println("len->" + len + ",offset->" + offset + ",topicLen->" + topicLen);
		String topic = new String(payloads, 1 + offset + 2, topicLen);
		//System.out.println("topic->" + topic);
		//System.out.println("pubPayload len->" + (len - (1 + offset + 2) - topicLen));
		int idOffset=qos>0?2:0;
		if(qos>0) {
			int b1=payloads[(1 + offset + 2) + topicLen];
			int b2=payloads[(1 + offset + 2) + topicLen+1];
			publishMqttData.setPackageId((b1<<8)+b2);
		}
		byte[] pubPayload = new byte[len - (1 + offset + 2) - topicLen-idOffset];
		ByteUtils.copy(payloads, pubPayload, (1 + offset + 2) + topicLen+idOffset, 0, len - (1 + offset + 2) - topicLen-idOffset);
		publishMqttData.setTopic(topic);
		publishMqttData.setPayload(pubPayload);
		publishMqttData.setCmdType(CmdType.PUBLISH);
		return publishMqttData;
	}

	private static MqttData handleCONNACK(byte[] payloads) {
		MqttData mqttData = new MqttData();
		mqttData.setCmdType(CmdType.CONNACK);
		return mqttData;
	}

	private static MqttData handleCONNECT(byte[] payloads) {
		// 10 29 00 04 |4D 51 54 54 mqtt|04 protocolLevel|C2 connectFlag|00 00 keeplive
		// clientid 00 0E 6D 71 74 74 78 5F 34 31 36 34 64 64 61 35
		// username 00 05 61 64 6D 69 6E
		// password 00 06 31 32 33 34 35 36

		// TODO Auto-generated method stub
		ConnectMqttData mqttData = new ConnectMqttData();
		mqttData.setCmdType(CmdType.CONNECT);
		int[] pair = LengthUtil.parseLength(payloads, 1);
		int dataLen = pair[0];
		int len = pair[1];
		int start = 1 + len;
		start += 6;
		// LengthUtil.calc(len);
		// protocolLevel,connectFlag
		mqttData.setProtocolLevel(payloads[start]);
		mqttData.setConnectFlag(payloads[start + 1]);
		int keeplive = ((payloads[start + 2] & 0xff) << 8) + (payloads[start + 3] & 0xff);
		mqttData.setKeepalive(keeplive);
		start = start + 4;

		int clientidLen = ((payloads[start] & 0xff) << 8) + (payloads[start + 1] & 0xff);
		String clientId = new String(payloads, start + 2, clientidLen);
		start += 2 + clientidLen;
		mqttData.setClientId(clientId);
		// |Bit |7 |6 |5 |4 |3 |2 |1 |0
		// | |User Name Flag |Password Flag |Will Retain |Will QoS |Will Flag |Clean
		// Session |Reserved
		// |byte 8 |X |X |X |X |X |X |X |0
		parseConnectFlag(mqttData);
		// int connectFlag = mqttData.getConnectFlag();
		if (mqttData.getWillFlag() > 0) {
			int topicLen = ((payloads[start] & 0xff) << 8) + (payloads[start + 1] & 0xff);
			String willtopic = new String(payloads, start + 2, topicLen);
			start += 2 + topicLen;
			mqttData.setWillTopic(willtopic);
		}
		if (mqttData.getUsernameFlag() > 0) {
			// username
			int userLen = ((payloads[start] & 0xff) << 8) + (payloads[start + 1] & 0xff);
			String username = new String(payloads, start + 2, userLen);
			start += 2 + userLen;
			mqttData.setUsername(username);
		}
		if (mqttData.getPasswordFlag() > 0) {
			// password
			int passLen = ((payloads[start] & 0xff) << 8) + (payloads[start + 1] & 0xff);
			String password = new String(payloads, start + 2, passLen);
			start += 2 + passLen;
			mqttData.setPassword(password);
		}

		return mqttData;
	}

	private static void parseConnectFlag(ConnectMqttData mqttData) {
		// |Bit |7 |6 |5 |4 |3 |2 |1 |0
		// | |User Name Flag |Password Flag |Will Retain |Will QoS |Will Flag |Clean
		// Session |Reserved
		// |byte 8 |X |X |X |X |X |X |X |0
		int connFlag = mqttData.getConnectFlag();
		mqttData.setCleanSession((connFlag & 0b0000_0010) == 0 ? 0 : 1);
		mqttData.setWillFlag((connFlag & 0b0000_0100) == 0 ? 0 : 1);
		mqttData.setWillQoS((connFlag & 0b0001_1000) >> 3);
		mqttData.setWillRetain((connFlag & 0b0010_0000) == 0 ? 0 : 1);
		mqttData.setPasswordFlag((connFlag & 0b0100_0000) == 0 ? 0 : 1);
		mqttData.setUsernameFlag((connFlag & 0b1000_0000) == 0 ? 0 : 1);
	}

	public static void main1(String[] args) {
		byte[] pub = { (byte) 0x10, (byte) 0x29, (byte) 0x00, (byte) 0x04, (byte) 0x4D, (byte) 0x51, (byte) 0x54,
				(byte) 0x54, (byte) 0x04, (byte) 0xC2, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0E, (byte) 0x6D,
				(byte) 0x71, (byte) 0x74, (byte) 0x74, (byte) 0x78, (byte) 0x5F, (byte) 0x34, (byte) 0x31, (byte) 0x36,
				(byte) 0x34, (byte) 0x64, (byte) 0x64, (byte) 0x61, (byte) 0x35, (byte) 0x00, (byte) 0x05, (byte) 0x61,
				(byte) 0x64, (byte) 0x6D, (byte) 0x69, (byte) 0x6E, (byte) 0x00, (byte) 0x06, (byte) 0x31, (byte) 0x32,
				(byte) 0x33, (byte) 0x34, (byte) 0x35, (byte) 0x36 };
		ConnectMqttData connectMqttData = (ConnectMqttData) handleCONNECT(pub);
		System.out.println(connectMqttData.getConnectFlag());
		System.out.println(connectMqttData.getClientId());
		System.out.println(connectMqttData.getWillTopic());
		System.out.println(connectMqttData.getUsername());
		System.out.println(connectMqttData.getPassword());
		System.out.println("CleanSession:" + connectMqttData.getCleanSession());
		System.out.println("WillFlag:" + connectMqttData.getWillFlag());
		System.out.println("WillQoS:" + connectMqttData.getWillQoS());
		System.out.println("WillRetain:" + connectMqttData.getWillRetain());
		System.out.println("PasswordFlag:" + connectMqttData.getPasswordFlag());
		System.out.println("UsernameFlag:" + connectMqttData.getUsernameFlag());
	}

public static void main(String[] args) {

		// 30 BD D8 02 00 03 4A 53 48 7B 22 64
		// 30 AF B2 01 00 03 4A 53 48 7B 22 64
		String sss = "00034A53487B22646964223A22464A41333130313338383530222C227574696D65223A22323032352F31312F31332031363A32313A3338222C22636F6E74656E74223A5B7B22706964223A2232222C2274797065223A2230222C2261646472223A2251534230315F5A4849222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230315F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2230222C2261646472223A2251534230325F5A4849222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230325F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2230222C2261646472223A2251534230335F5A4849222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230335F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2230222C2261646472223A2251534230345F5A4849222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2232222C2274797065223A2231222C2261646472223A2251534230345F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224353504830315F5048222C226164647276223A22372E303931353939222C226374696D65223A22323032352F31312F31332031363A31383A3530227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224353534C30315F434C222C226164647276223A22302E323039313036222C226374696D65223A22323032352F31312F31332031363A31383A3533227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2243534630315F4654222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3534227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2243534630325F4654222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3534227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2243534630335F4654222C226164647276223A22313035392E333138323337222C226374696D65223A22323032352F31312F31332031363A31383A3534227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2243534630345F4654222C226164647276223A223138372E383238393138222C226374696D65223A22323032352F31312F31332031363A31383A3534227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2243535330315F5353222C226164647276223A22302E303230333435222C226374696D65223A22323032352F31312F31332031363A31383A3439227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F41425F55222C226164647276223A223339342E393232393133222C226374696D65223A22323032352F31312F31332031363A31383A3535227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F414E5F49222C226164647276223A223237332E373230303031222C226374696D65223A22323032352F31312F31332031363A31383A3535227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F42435F55222C226164647276223A223339352E343636313837222C226374696D65223A22323032352F31312F31332031363A31383A3535227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F424E5F49222C226164647276223A223235342E363430303135222C226374696D65223A22323032352F31312F31332031363A31383A3535227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F41435F55222C226164647276223A223339362E353834303135222C226374696D65223A22323032352F31312F31332031363A31383A3535227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F434E5F49222C226164647276223A223236372E313430303135222C226374696D65223A22323032352F31312F31332031363A31383A3536227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230315F5057222C226164647276223A22353030343231302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3536227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F41425F55222C226164647276223A223339342E383838373934222C226374696D65223A22323032352F31312F31332031363A31383A3536227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3537227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F42435F55222C226164647276223A223339352E313734313033222C226374696D65223A22323032352F31312F31332031363A31383A3536227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3537227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F41435F55222C226164647276223A223339362E393230353032222C226374696D65223A22323032352F31312F31332031363A31383A3537227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3537227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230325F5057222C226164647276223A22333534383930372E373530303030222C226374696D65223A22323032352F31312F31332031363A31383A3537227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F41425F55222C226164647276223A223339362E393336313838222C226374696D65223A22323032352F31312F31332031363A31393A3034227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3034227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F42435F55222C226164647276223A223339342E393536393039222C226374696D65223A22323032352F31312F31332031363A31393A3034227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3034227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F41435F55222C226164647276223A223339352E363536383931222C226374696D65223A22323032352F31312F31332031363A31393A3034227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3035227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230335F5057222C226164647276223A22323739313930342E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3035227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F41425F55222C226164647276223A223339352E363033333934222C226374696D65223A22323032352F31312F31332031363A31393A3035227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3036227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F42435F55222C226164647276223A223339372E363232313031222C226374696D65223A22323032352F31312F31332031363A31393A3035227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3036227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F41435F55222C226164647276223A223339362E323239343932222C226374696D65223A22323032352F31312F31332031363A31393A3036227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3036227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230345F5057222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3036227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F41425F55222C226164647276223A223339352E343033303135222C226374696D65223A22323032352F31312F31332031363A31393A3037227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3037227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F42435F55222C226164647276223A223339372E333935323934222C226374696D65223A22323032352F31312F31332031363A31393A3037227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3037227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F41435F55222C226164647276223A223339362E303631383930222C226374696D65223A22323032352F31312F31332031363A31393A3037227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3038227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2253534230355F5057222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3038227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A2251534330315F4C54222C226164647276223A22322E323836383937222C226374696D65223A22323032352F31312F31332031363A31383A3533227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F41425F55222C226164647276223A223339342E363437303935222C226374696D65223A22323032352F31312F31332031363A31383A3538227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F414E5F49222C226164647276223A223237332E363030303036222C226374696D65223A22323032352F31312F31332031363A31383A3538227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F42435F55222C226164647276223A223339352E343032383933222C226374696D65223A22323032352F31312F31332031363A31383A3538227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F424E5F49222C226164647276223A223235362E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3538227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F41435F55222C226164647276223A223339362E363039343937222C226374696D65223A22323032352F31312F31332031363A31383A3538227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F434E5F49222C226164647276223A223236382E343430303032222C226374696D65223A22323032352F31312F31332031363A31383A3539227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730315F5057222C226164647276223A22383536323238382E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3539227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F41425F55222C226164647276223A223339342E333833333031222C226374696D65223A22323032352F31312F31332031363A31383A3539227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F414E5F49222C226164647276223A223236392E313330303035222C226374696D65223A22323032352F31312F31332031363A31393A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F42435F55222C226164647276223A223339352E323336363934222C226374696D65223A22323032352F31312F31332031363A31383A3539227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F424E5F49222C226164647276223A223235312E333639393935222C226374696D65223A22323032352F31312F31332031363A31393A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F41435F55222C226164647276223A223339362E323636363933222C226374696D65223A22323032352F31312F31332031363A31393A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F434E5F49222C226164647276223A223237312E323330303131222C226374696D65223A22323032352F31312F31332031363A31393A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730325F5057222C226164647276223A22353633373438302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3030227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F41425F55222C226164647276223A223339372E333639393935222C226374696D65223A22323032352F31312F31332031363A31393A3031227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3031227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F42435F55222C226164647276223A223339352E333839333133222C226374696D65223A22323032352F31312F31332031363A31393A3031227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3031227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F41435F55222C226164647276223A223339362E303838393839222C226374696D65223A22323032352F31312F31332031363A31393A3031227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3032227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730335F5057222C226164647276223A2235362E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3032227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F41425F55222C226164647276223A223339322E303934393130222C226374696D65223A22323032352F31312F31332031363A31393A3032227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F414E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3033227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F42435F55222C226164647276223A223339332E333137383130222C226374696D65223A22323032352F31312F31332031363A31393A3032227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F424E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3033227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F41435F55222C226164647276223A223339312E373836323835222C226374696D65223A22323032352F31312F31332031363A31393A3033227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F434E5F49222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3033227D2C7B22706964223A2233222C2274797065223A2230222C2261646472223A224A584730345F5057222C226164647276223A22323733343938332E303030303030222C226374696D65223A22323032352F31312F31332031363A31393A3033227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C425730315F4852554E222C226164647276223A2236222C226374696D65223A22323032352F31312F31332031363A31383A3436227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C30315F5454222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3437227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C30325F5454222C226164647276223A2236302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3437227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C30315F5A4849222C226164647276223A22302E303030303030222C226374696D65223A22323032352F31312F31332031363A31383A3533227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230315F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3538227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230315F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3538227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C4230315F5A4849222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3233227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230325F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3537227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230325F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3537227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C4230325F5A4849222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3233227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230335F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3537227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A4C4230335F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A32303A3537227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A4C4230335F5A4849222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3233227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A53504830315F5048222C226164647276223A2231312E313034323539222C226374696D65223A22323032352F31312F31332031363A31383A3534227D2C7B22706964223A2234222C2274797065223A2230222C2261646472223A224A535330315F5353222C226164647276223A22392E343034313035222C226374696D65223A22323032352F31312F31332031363A31383A3533227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30315F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3337227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30315F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3337227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30325F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3337227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30325F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3337227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30335F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3336227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30335F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3336227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30345F5841222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3336227D2C7B22706964223A2234222C2274797065223A2231222C2261646472223A224A424A30345F584C222C226164647276223A2230222C226374696D65223A22323032352F31312F31332031363A31383A3336227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230315F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230325F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246585630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2246584230335F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C515330315F5353222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C48434C30315F434C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C485330315F5353222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330315F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630315F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630315F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630315F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330325F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630325F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630325F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630325F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330335F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630335F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630335F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630335F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630345F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630345F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630345F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630345F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630345F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630345F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630345F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630345F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330345F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630345F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630345F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630345F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630345F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630355F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630355F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630355F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630355F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630355F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630355F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630355F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630355F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630355F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630355F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630355F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630355F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330355F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630355F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630355F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630355F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630355F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630365F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630365F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630365F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630365F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630365F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630365F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630365F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630365F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630365F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630365F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630365F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630365F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330365F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630365F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630365F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630365F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630365F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630375F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630375F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630375F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630375F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630375F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630375F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630375F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630375F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630375F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630375F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630375F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630375F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330375F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630375F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630375F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630375F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630375F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630385F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630385F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2243535630385F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630385F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630385F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2250575630385F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630385F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630385F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2251435630385F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630385F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630385F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2253435630385F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A224C4330385F4C54222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630385F5A534C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630385F5A5348222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A224A535630385F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2230222C2261646472223A2243535630385F485A49222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30315F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30315F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30325F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30325F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30335F5841222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D2C7B22706964223A2235222C2274797065223A2231222C2261646472223A2247464A30335F584C222C226164647276223A22222C226374696D65223A22313937302F30312F30312030303A30303A3030227D5D7D";
		byte[] bts = hexStringToBytes(sss);
		String ssssss = new String(bts);
		System.out.println(ssssss);
		MqttData mqa = handlePUBLISH(bts,bts.length);
		System.out.println("ok");
	}

	public static byte[] hexStringToBytes(String hexString) {
		if (hexString == null || hexString.length() % 2 != 0) {
			throw new IllegalArgumentException("Invalid hex string length");
		}

		char[] chars = hexString.toCharArray();
		byte[] result = new byte[chars.length / 2];

		for (int i = 0; i < chars.length; i += 2) {
			// 处理大小写混合的十六进制字符
			int high = Character.digit(chars[i], 16);
			int low = Character.digit(chars[i + 1], 16);

			// 组合成完整字节（0-255范围）
			result[i / 2] = (byte) ((high << 4) | low);
		}
		return result;
	}
	
	
	public static int getQos(byte head) {
		return 0;
	}
}
